home *** CD-ROM | disk | FTP | other *** search
/ HyperLib 1997 Winter - Disc 1 / HYPERLIB-1997-Winter-CD1.ISO.7z / HYPERLIB-1997-Winter-CD1.ISO / オンラインウェア / PRG / ICProgKit 1.3.sit / ICProgKit1.3 / APIs / ICTypes.h < prev    next >
Text File  |  1996-08-24  |  4KB  |  107 lines

  1. /* ・・・Start Header・・・ */
  2.  
  3. /* File:         ICTypes.h
  4.  * Generated by: 1.0d4
  5.  * For:          IC 1.3
  6.  * On:           Sunday, 14 July 1996, 20:19:55
  7.  * 
  8.  * This file is part of the Internet Configuration system and
  9.  * is placed in the public domain for the benefit of all.
  10.  */
  11.  
  12. /* ・・・End Header・・・ */
  13.  
  14. /*
  15.     IMPORTANT NOTES ABOUT THE C CONVERSION
  16.     --------------------------------------
  17.     
  18.     o Pascal "var" parameters are converted from "var x : y" to "y *x".  This
  19.       means that when you see the parameter "y *x" you should be aware that
  20.         you *cannot pass in nil*.  In future this restriction may be eased,
  21.         especially for the attr parameter to ICGetPref.  Parameters where nil
  22.         is legal are declared using the explicit pointer type, ie "yPtr x".
  23.  
  24.     o Strings are *Pascal* strings.  This means that they must be word aligned.
  25.         MPW and Think C do this automatically.  The last time I check, Metrowerks
  26.         C does not.  If it still doesn't, then IMHO it's a bug in their compiler
  27.         and you should report it to them.
  28.  
  29.     o The canonical Internet Config interface is defined in Pascal.  These
  30.         headers have not been thoroughly tested.  If there is a conflict between
  31.         these headers and the Pascal interfaces, the Pascal should take precedence.
  32. */
  33.  
  34. /* ///////////////////////////////////////////////////////////////////////////////// */
  35.  
  36. #ifndef __ICTYPES__
  37. #define __ICTYPES__
  38.  
  39. #ifndef __TYPES__
  40. #include <Types.h>
  41. #endif
  42.  
  43. /* ///////////////////////////////////////////////////////////////////////////////// */
  44.  
  45. #if PRAGMA_ALIGN_SUPPORTED
  46. #pragma options align=mac68k
  47. #endif
  48.  
  49. enum {
  50.     icPrefNotFoundErr = -666,        /* preference not found (duh!) */
  51.     icPermErr = -667,                        /* cannot set preference */
  52.     icPrefDataErr = -668,                /* problem with preference data */
  53.     icInternalErr = -669,                /* hmm, this is not good */
  54.     icTruncatedErr = -670,            /* more data was present than was returned */
  55.     icNoMoreWritersErr = -671,    /* you cannot begin a write session because someone else is already doing it */
  56.     icNothingToOverrideErr = -672,    /* no component for the override component to capture */
  57.     icNoURLErr = -673,                        /* no URL found */
  58.     icConfigNotFoundErr = -674,            /* no configuration was found */
  59.     icConfigInappropriateErr = -675    /* incorrect manufacturer code */
  60. };
  61.  
  62. enum {
  63.     ICattr_no_change = 0xFFFFFFFFL,                /* supply this to ICSetPref to tell it not to change the attributes */
  64.     ICattr_locked_bit = 0,                                /* bits in the preference attributes */
  65.     ICattr_locked_mask = 0x00000001L,            /* masks for the above */
  66.     ICattr_volatile_bit = 1,
  67.     ICattr_volatile_mask = 0x00000002L,
  68.     icNoUserInteraction_bit = 0,
  69.     icNoUserInteraction_mask = 0x00000001L
  70. };
  71.  
  72. #define ICfiletype 'ICAp'
  73. #define ICcreator 'ICAp'
  74.  
  75. #define ICdefault_file_name "¥pInternet Preferences"    /* default file name, for internal use, overridden by a component resource */
  76.  
  77. struct ICDirSpec {                                            /* a record that specifies a folder */
  78.     short vRefNum;
  79.     long dirID;
  80. };
  81. typedef struct ICDirSpec ICDirSpec;
  82.  
  83. typedef ICDirSpec ICDirSpecArray[4];        /* an array of the above */
  84. typedef ICDirSpec *ICDirSpecArrayPtr;    /* a pointer to that array */
  85.  
  86. typedef long ICAttr;                                        /* type for preference attributes */
  87. typedef long ICError;                                        /* type for error codes */
  88. typedef Ptr ICInstance;                                    /* opaque type for preference reference */
  89. enum {
  90.     icNoPerm = 0,
  91.     icReadOnlyPerm = 1,
  92.     icReadWritePerm = 2
  93. };
  94. typedef unsigned char ICPerm;
  95.  
  96. struct ICConfigRef {
  97.     OSType manufacturer;
  98.     /* other private data follows */
  99. };
  100. typedef struct ICConfigRef ICConfigRef, *ICConfigRefPtr, **ICConfigRefHandle;
  101.  
  102. #if PRAGMA_ALIGN_SUPPORTED
  103. #pragma options align=reset
  104. #endif
  105.  
  106. #endif
  107.